home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3295 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  849 b 

  1. Path: EU.net!sun4nl!xs4all!falstaff
  2. From: falstaff@xs4all.nl (Falstaff)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: The size of a file
  5. Date: 27 Jan 1996 17:43:36 GMT
  6. Organization: XS4ALL, networking for the masses
  7. Message-ID: <4edo88$4c7@news.xs4all.nl>
  8. References: <4ebc03$4gv@gate.compart.fi>
  9. NNTP-Posting-Host: xs1.xs4all.nl
  10. X-Newsreader: NN version 6.5.0 #666 (NOV)
  11.  
  12. Fredrik Sandstrom <fred@spider.compart.fi> writes:
  13.  
  14. >This is driving me nuts.  I can't find a simple way to get the size of a
  15. >disk file.  This must be possible using the standard C library, but I
  16. >haven't figured out how!
  17.  
  18. f=fopen()
  19. fseek(f,SEEK_END,0)
  20. ftell(f)
  21. fclose(f)
  22.  
  23. done
  24. --
  25. "Life without a backbone is hardly worth consideration."
  26. ------------------------------------------------------------------------
  27. Frank A. Vorstenbosch        +31-(70)-355 5241        falstaff@xs4all.nl
  28.